package com.logictech.lims.dao.impl;

import java.util.List;

import org.jeecgframework.p3.core.utils.common.PageQuery;
import org.jeecgframework.p3.core.utils.common.PageQueryWrapper;
import org.jeecgframework.p3.core.utils.persistence.mybatis.GenericDaoDefault;
import org.springframework.stereotype.Repository;
import com.logictech.lims.dao.ReagentTypeDao;
import com.logictech.lims.dto.ReagentTypeDto;
import com.logictech.lims.entity.ReagentType;

/**
 * 描述：</b>ReagentTypeDaoImpl<br>
 * @author：guoqi
 * @since：2017年03月21日 16时10分47秒 星期二 
 * @version:1.0
 */
@Repository("reagentTypeDao")
public class ReagentTypeDaoImpl extends GenericDaoDefault<ReagentType> implements ReagentTypeDao{

	@Override
	public Integer count(PageQuery<ReagentTypeDto> pageQuery) {
		return (Integer) super.queryOne("count",pageQuery);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ReagentTypeDto> queryPageList(
			PageQuery<ReagentTypeDto> pageQuery,Integer itemCount) {
		PageQueryWrapper<ReagentType> wrapper = new PageQueryWrapper<ReagentType>(pageQuery.getPageNo(), pageQuery.getPageSize(),itemCount, pageQuery.getQuery());
		return (List<ReagentTypeDto>)super.query("queryPageList",wrapper);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ReagentTypeDto> queryAll(String name) {
		return super.query("queryAll",name);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ReagentTypeDto> queryList(PageQuery<ReagentTypeDto> pageQuery) {
		return super.query("queryList",pageQuery);
	}
}

